<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
	<head>
		<meta name="author" content="Bardelle Renzo"/>
		<title>Modifica dati utente</title>
		
		<meta http-equiv="Content-type" content="text/html" />
		
		<link rel="shortcut icon" href="css/images/favicon.ico" />
		<link rel="stylesheet" href="css/style_global.css" type="text/css" media="all" />
		<link rel="stylesheet" href="css/modifica_dati.css" type="text/css" media="all" />
		
		<script type="text/javascript" src="jQuery/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="js/controlliInput.js"></script>
		<script type="text/javascript" src="js/modifica_dati.js"></script>
		
		<script type="text/javascript">
		<% if(session.getAttribute("utente")==null) out.print("window.location=\"../index.jsp\";"); %>
		</script>
	
	</head>
	<body>
		<div id="wrapper">
    		<h1 id="logo"><a href="index.jsp" title="Hesperia.com" ></a></h1>
			<!-- LOGIN MENU -->
			<jsp:include page="login_menu.jsp"/>
			<!-- End LOGIN MENU -->
			<!-- MENU -->
			<jsp:include page="nav_menu.jsp"/>
			<!-- End MENU -->
    		
    		<div class="shell">
        		<!-- Main -->
        		<div id="main">
            		<!-- Box-Holder-->
            		<div class="box-holder">
	            		<div class="box-top"></div>
	                	<div class="box">
						
							<!-- MODIFICA DATI -->	
							<div id="form-content-div">
								<font id="form-title">Modifica dati utente</font><br/><br/>
				
								<div id="messaggi-utente">
									<% 
											if(request.getParameter("edited") != null && request.getParameter("edited").equals("true") )
												out.println("<font size=\"+2\" color=\"green\">Modifica effettuata con successo!</font>");
									%>
								</div><br/>
								<form name="form-core" action="" onsubmit="return submitForm()">
									<table id="form-table">
										<tr><td>Nome:</td><td><input id="nome" stato="u" onclick="edit(this);" onblur="leave(this);" type="text" name="nome" iniziale="<%=session.getAttribute("nome_utente")%>" value="<%=session.getAttribute("nome_utente")%>"/></td></tr>
										<tr><td>Cognome:</td><td><input id="cognome" stato="u" onclick="edit(this);" onblur="leave(this);" type="text" name="cognome" iniziale="<%=session.getAttribute("cognome_utente")%>" value="<%=session.getAttribute("cognome_utente")%>"/></td></tr>
										<tr><td>Email:</td><td><input id="email" stato="u" onclick="edit(this);" onblur="leave(this);" type="text" name="email" iniziale="<%=session.getAttribute("email_utente")%>" value="<%=session.getAttribute("email_utente")%>"/></td></tr>
										<tr><td>Password:</td><td><input id="password" stato="u" onclick="edit(this);" onblur="leave(this);" type="password" name="password" iniziale="" value=""/></td></tr>
										<tr><td>Codice fiscale:</td><td><input id="codfiscale" stato="u" onclick="edit(this);" onblur="leave(this);" onclick="editElement(this);" type="text" name="codfiscale" iniziale="<%=session.getAttribute("codfiscale_utente")%>" value="<%=session.getAttribute("codfiscale_utente")%>"/></td></tr>
										<tr><td>N. Carta di credito:</td><td><input id="cartacredito" stato="u" onclick="edit(this);" onblur="leave(this);" type="text" name="cartacredito" iniziale="<%=session.getAttribute("cartacredito_utente")%>" value="<%=session.getAttribute("cartacredito_utente")%>"/></td></tr>
										<tr><td>Iscrivimi alla newsletter:</td><td><input id="newsletter" stato="u" onclick="newsletterChange();" type="checkbox" name="newsletter" id="newsletter" <% if(session.getAttribute("newsletter_utente") != null && (Boolean)session.getAttribute("newsletter_utente") ) out.print("checked=\"true\""); %>/></td></tr>
										<tr><td></td><td><input type="submit" value="Salva"></td></tr>				
									</table>
								</form>
							</div>
							<!-- END MODIFICA DATI -->

						</div>
	            		<div class="box-bottom"></div>
	        		</div>
            		<!-- End Box-Holder -->
        		</div>
        		<!-- End Main -->
        		<!-- Footer -->
				<jsp:include page="footer.html"/>
        		<!-- end Footer -->	
        	</div>
        	<!-- End Shell -->
        </div>
        <!-- End Wrapper -->
	</body>
</html>
